import http from '@/api';
import { PORT2 } from '@/api/config/servicePort';
import { Dictionary } from '@/api/interface/basic/dictionary';

// 获取字典目录树
export const dictCatalogTree = async () => http.get(PORT2 + `/dic/catalogTree`);

// 根据字典目录编码查询字典列表
export const dictListByCatalogCode = params => http.post(PORT2 + `/dic/listByCatalogCode`, params);

// 保存字典值
export const dictSave = (params: Dictionary.ReqDoSave) => http.post(PORT2 + `/dic/add`, params);

// 保存字典值
export const dictUpdate = (params: Dictionary.ReqDoSave) => http.post(PORT2 + `/dic/update`, params);

// 启用字典值
export const dictEnable = params => http.post(PORT2 + `/dic/enable`, params);

// 禁用字典值
export const dictDisable = params => http.post(PORT2 + `/dic/disable`, params);
